package org.jeecg.modules.wlhy.customerwallet.service;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.wlhy.customerwallet.entity.HyCustomerWallet;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wlhy.customerwallet.entity.HyCustomerWalletRecharge;

import java.math.BigDecimal;

/**
 * @Description: hy_customer_offline_wallet
 * @Author: jeecg-boot
 * @Date:   2021-10-20
 * @Version: V1.0
 */
public interface IHyCustomerWalletService extends IService<HyCustomerWallet> {

    HyCustomerWallet getByCustomerId(String customerId);

    BigDecimal getDJSByCustomerId(String customerId);

    HyCustomerWallet getWalletInfo(String customerId);

    HyCustomerWalletRecharge exchange(HyCustomerWallet customerWallet, BigDecimal amt, String channel, String remark);

    void recharge(HyCustomerWallet customerWallet, BigDecimal amt, String remark);

    void kc(HyCustomerWallet customerWallet, BigDecimal amt, String remark);
    /**
     * 悲观锁，需配合 @Transactional
     * @param customerId
     * @return
     */
    HyCustomerWallet getByCustomerIdForUpdate(String customerId);
}
